package com.softeem.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.softeem.dao.IReservoirDao;
import com.softeem.model.Reservoir;
import com.softeem.service.IReservoirService;

@Service
public class ReservoirServiceImpl implements IReservoirService {
	  //自动装配
    @Resource
    private IReservoirDao ReservoirDao;
    

    
    /**
     * 查询水库总数
     */
    public int queryReservoirCount() {
        return ReservoirDao.queryReservoirCount();
    }
    
 
    /**
     * 根据水库id查询水库
     */
    public Reservoir queryReservoirById(int Reservoirid){
        return ReservoirDao.queryReservoirById(Reservoirid);
    }
    
    /**
     * 新增水库
     */
    public int insertReservoir(Reservoir Reservoir){
        return ReservoirDao.insertReservoir(Reservoir);
    }
    
    /**
     * 修改水库
     */
    public int updateReservoir(Reservoir Reservoir){
        return ReservoirDao.updateReservoir(Reservoir);
    }
    
    /**
     * 根据水库id删除水库
     */
    public int deleteReservoirById(int Reservoir_id){
        return ReservoirDao.deleteReservoirById(Reservoir_id);
    }

	public List<Reservoir> queryReservoirs(Reservoir r) {
		
		return ReservoirDao.queryReservoirs(r);
	}


	

}
